<?php

class monster
{
  public $hp = 200;

  public function run(){
    echo "monster run ....";
  }
  public function fire($act){
    echo "monster fire.....";
    $act->hp = $act->hp - 5;
  }
}
$act = new Action;
$monsters = array();
for($i=0; $i<10;$i++){
  $monsters[] =new Monsters;
}
//像怪物第一次发射攻击
//var_dump($monsters);
$act->fire($monster[0]);
e("act:". $act->hp);
e("monsters:". $monsters[0]->hp);
 ?>
